
<fieldset>
    <input type="hidden" name="cantItem" id="cantItem" value="0">
      <input type="hidden" value="0" name="numItem" id="numItem">
        <table class="table table-bordered">
            <tbody>
            <td>
                <div class="control-group">
                <label class="control-label" ><p align="right"><font color="black" face="arial" size="+0"><strong><?php if(isset($fecha)){echo $fecha;} else echo "<script language=\"javascript\"> mostrarFecha() </script>";?></strong></font></p></label>                 
                </div>
                <div class="control-group">
                    <label class="control-label" for="codCli">Cod. Cliente</label>
                    <div class="controls">
                        <input class="input-small" id="codCli" name="codCli"  type="text"  value=<?php if(isset($codCliente)){echo "'".trim($codCliente)."'";}else echo"''"?>>    
                        <button class="btn btn-success" type="button" onclick="abrirModal('myModalC')">Buscar Cliente</button>
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="ruc">RUC </label>
                    <div class="controls">
                        <input id="ruc" name="ruc"  type="text"  value=<?php if(isset($ruc)){echo "'".trim($ruc)."' readonly=\"readonly\"";}else echo"'' placeholder=\"RUC\" "?>>                            
                    </div>
                </div>
                <div class="control-group">
                    <label class="control-label" for="idNomRep">Nombre Representante </label>
                    <div class="controls">
                        <input readonly="readonly" id="idNomRep" type="text" value=<?php if(isset($nomRepre)){echo "'".$nomRepre."'";}else echo" '' placeholder=\"Nom. Representante\""?>>
                    </div>
                </div>
                <div class="control-group">                    
                    <div class="controls">                        
                        <a href="<?php echo base_url() ?>cliente/registrarCliente"> <button class="btn btn-success" type="button">Nuevo Cliente</button></a>
                    </div>
                </div>
            </td>
            <td>
                <div class="control-group controls-row">
                    <label class="control-label" >Tipo: </label>
                    <label class="radio inline"><input type="radio" name="opRad" id="opRad1" value="0" checked>Proforma</label>
                    <label class="radio inline"><input type="radio" name="opRad" id="opRad2" value="1">Pedido</label>            
                </div>
                <div class="control-group controls-row">     
                    <label class="control-label" for="estado">Prioridad</label>
                    <div class="controls">
                        <SELECT NAME="prioridad" > 
                        <OPTION VALUE="3">Alta</OPTION>
                        <OPTION VALUE="2">Media</OPTION>
                        <OPTION VALUE="1">Baja</OPTION>                        
                        </SELECT>
                    </div>                    
                </div>                
                <?php sipcop_datePicker_nuevo('fecEnt', 'Fecha Entrega', 'dd-mm-yyyy', date("d-m-Y"), true,$inForm=true,6)?>
                <div class="control-group">
                    <label class="control-label" for="det">Detalle </label>
                    <div class="controls">
                        <textarea name="det" id="det" rows="2" value= <?php if(isset($obs)){echo "'".$obs."'";}else echo " '' "?>></textarea>
                    </div>
                </div>
                                
            </td>
            </tbody>
      </table>
<fieldset class="well">
    <table class=" table table-bordered">
        <tbody>
        <td> 
            <div class="control-group">
                <label class="control-label" for="nom">Nombre Item* </label>
                <div class="controls">
                    <input class="input-small" id="nom"name="nom" type="text" >
                </div>
            </div>
            <?php sipcop_comboBox('category', 'Categoria', $categorias, '', 'Categoria', true, $size='180', $inForm=true);?>
        </td>
        <td>                                     
        <div class="control-group">
            <label class="control-label" for="cantUnidades" >Cantidad(Unid.)* </label>
            <div class="controls">
                <input class="input-small" onblur="validaNum('cantUnidades','Cantidad')" id="cantUnidades" name="cantUnidades" type="text" >
            </div>
        </div>
        <div class="control-group">
            <label class="control-label" for="desc">Descripción </label>
            <div class="controls">
                <textarea id="desc" name="desc" rows="3"></textarea>
            </div>
        </div>
        </td>
        </tbody>
    </table>

                            

            &nbsp;&nbsp;
    <button class="btn btn-primary" type="button" onclick="cargarItemPed('cantItem','fasessdiv','cantFases','insumosdiv','cantInsumos','numItem','nom','category','cantUnidades','desc','tablaItems','<?php echo base_url(); ?>media/img/')">Agregar Item</button>        
    <table id="tablCuer" class="table table-striped" width="100%">                    
        <caption><h4>Detalle Items</h4></caption>
            <thead>
                <th>Cod. Item</th>
                <th>Nombre</th>
                <th>Categoría</th>
                <th>Descripción</th>                
                <th>Cantidad</th>
                <th>P. Unit.(S/.)</th> 
                <th>Subtotal (S/.)</th>
                <th>Quitar</th> 
            </thead>
            <tbody id="tablaItems" name="tablaItems">     
            </tbody>                       
    </table>
 </fieldset> 
  </fieldset> 